//===================================================================================
// $$
//
// Coder: Code Milker v1.0
// 0 - upper
// 1 - lower
//===================================================================================

namespace App.Domain.Handlers {
    using System;
    using App.Data;
    using App.Domain.Contracts;
    using App.Model;

    public class GetJobCategory {
        private readonly IJobCategoryRepository _jobCategoryRepository;

        public GetJobCategory(IJobCategoryRepository jobCategoryRepository) {
            _jobCategoryRepository = jobCategoryRepository;
        }

        public JobCategory Execute(Guid jobCategoryId) {
            try {
                return _jobCategoryRepository.GetJobCategory(jobCategoryId);
            }
            catch (InvalidOperationException ex) {
                throw new BusinessServicesException("UnableToRetrieveReminderExceptionMessage", ex);
            }
        }
    }
}
